﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="Directory.Web.Register" MasterPageFile="~/DefaultMasterPage.master" Theme="Default" Codebehind="Register.aspx.cs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server" >
	<title><% = Directory.Web.WebSettings.GetInstance().SiteName %> — 注册新会员</title>
</asp:Content>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
		<table>
			<tr>
				<td><label>用户名：</label></td>
				<td>
					<asp:TextBox ID="tbName" runat="server" Width="200"></asp:TextBox>
					<span class="notes">通常以用户邮箱作为用户名</span>
					<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="tbName"></asp:RequiredFieldValidator>
					<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
						ErrorMessage="格式不正确" ControlToValidate="tbName" 
						ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
				</td>
			</tr>
			<tr>
				<td><label>密码：</label></td>
				<td>
					<asp:TextBox ID="tbPassword" runat="server" TextMode="Password" Width="200"></asp:TextBox>
					<span class="notes">长度应该为至少6个字符</span>
					<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*" ControlToValidate="tbPassword"></asp:RequiredFieldValidator>
					<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
						ControlToValidate="tbPassword" ErrorMessage="密码格式不正确" 
						ValidationExpression="\S{6,16}"></asp:RegularExpressionValidator>
				</td>
			</tr>
			<tr>
				<td><label>确认密码：</label></td>
				<td>
					<asp:TextBox ID="tbVerifyPwd" runat="server" TextMode="Password" Width="200"></asp:TextBox>
					<span class="notes">再次输入密码</span>
					<asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="密码不一致" ControlToCompare="tbPassword" ControlToValidate="tbVerifyPwd"></asp:CompareValidator>					
    			</td>
			</tr>
			<tr>
				<td><label>找回密码问题：</label></td>
				<td>
					<asp:TextBox ID="tbPassowrdQuestion" runat="server" Width="200"></asp:TextBox>
					<span class="notes">在忘记登陆信息的时候找回密码</span>
					<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*" ControlToValidate="tbPassowrdQuestion"></asp:RequiredFieldValidator>					
				</td>
			</tr>
			<tr>
				<td><label>密码问题答案：</label></td>
				<td>
					<asp:TextBox ID="tbPasswordAnswer" runat="server" Width="200"></asp:TextBox>
					<span class="notes">在忘记登陆信息的时候找回密码</span>
					<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="*" ControlToValidate="tbPasswordAnswer"></asp:RequiredFieldValidator>					
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<center>
					<asp:Button ID="btnRegister" runat="server" Text="注册" onclick="btnRegister_Click" />
					<asp:Literal ID="ltMsg" runat="server"></asp:Literal>
					</center>
				</td>
			</tr>
		</table>
</asp:Content>
